exports.teacher = function (req, res) {

    //获取restful参数
    var restfulParams = req.routeInfo.restfulParams;

    //最终结果
    var resultData = {};

    //任务流创建
    async.waterfall([
            //1.查询教师信息
            function (cb) {
                R.SEND_HTTP(
                    req,
                    {
                        url: CORE_APIConfig.coreAPI.search_art_user_user_teacher_info + "/uti_id/" +restfulParams.t_id,
                        method: 'POST',
                        data: {
                            fields: [
                                "uti_id",
                                "uti_name",
                                "uti_photo",
                                "uti_major",
                                "uti_education",
                                "uti_work_experience",
                                "uit_qualification",
                                "uti_honor",
                                "uti_seniority",
                                "u_header_url",
                                "uti_oid"
                            ].join(",")
                        }
                    },
                    function (err, data) {
                        //判断是否有错误信息
                        if (err) {
                            return cb(err, data);
                        }

                        resultData.teacherData = data.data[0];
                        cb();
                    }
                );

            },
        function(cb){

            R.SEND_HTTP(
                req,
                {
                    url    : CORE_APIConfig.coreAPI.searchOrganization+"/o_id/" + restfulParams.o_id,
                    method : 'POST',
                    data : {
                        fields:["o_id", "o_name", "o_address"].join(",")
                    }
                },
                function (err, data) {
                    //判断是否有错误信息
                    if (err) {
                        return cb(err, data);
                    }

                    resultData.organizationData = data.data;

                    cb();
                }
            );

        },
        function(cb){

            R.SEND_HTTP(
                req,
                {
                    url    : CORE_APIConfig.coreAPI.search_organization_course+"/oc_teacher_id/29",
                    method : 'POST',
                    data : {
                        fields:["oc_title", "oc_title_image", "oc_new_price", "oc_course_count"].join(",")
                    }
                },
                function (err, data) {
                    //判断是否有错误信息
                    if (err) {
                        return cb(err, data);
                    }

                    resultData.teacherCourseData = data.data;

                    cb();
                }
            );

        },

        ], function (err, result) {

            //返回最终拼接结果
            RES.response(res, true, resultData);

        }
    );

}